﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameServer.Database
{
    /// <summary>
    /// 玩家信息
    /// </summary>
    ///
    [Table(Name = "player")]
    public class DbPlayer
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int Id { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public int Coin { get; set; }
    }

    /// <summary>
    /// 玩家的角色
    /// </summary>
    [Table(Name = "character")]
    public class DbCharacter
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int Id { get; set; }
        public int JobId { get; set; }
        public string Name { get; set; }
        public int Hp { get; set; }
        public int Mp { get; set; }
        public int Attack { get; set; }
        public int Magic { get; set; }
        public int Defense { get; set; }
        public int MagicDefense { get; set; }
        public int Level { get; set; }
        public int Exp { get; set; }
        public int SpaceId { get; set; }
        public int X { get; set; } = 180;
        public int Y { get; set; } = 0;
        public int Z { get; set; } = 60730;
        public int Speed { get; set; } = 2;
        public long Gold { get; set; }
        public int PlayerId { get; set; }
        public int Baoji { get; set; }
        public int MaxHp { get; set; }
        public int MaxMp { get; set; }
        public int BaojiDefense { get; set; }
        [Column(DbType = "blob")]
        public byte[] Knapsack { get; set; }
        [Column(DbType = "blob")]
        public byte[] WareKnapsack { get; set; }
    }

    [Table(Name = "PossessSkill")]
    public class DbPossessSkill
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int Id { get; set; }
        public int CharacterId { get; set; }

        public int SkillId { get; set; }

    }

    [Table(Name = "UsingSkill")]
    public class DbUsingSkill
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int DbId { get; set; }
        public int CharacterId { get; set; }

        public int SkillId { get; set; }

    }
    public class DbSkill
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int DbId { get; set; }
        public int ID { get; set; } // 编号
        public int TID { get; set; } // 单位类型
        public int Code { get; set; } // 技能码
        public string Name { get; set; } // 技能名称
        public string Description { get; set; } // 技能描述
        public int Level { get; set; } // 技能等级
        public int MaxLevel { get; set; } // 技能上限
        public string Type { get; set; } // 类别
        public string Icon { get; set; } // 技能图标
        public string TargetType { get; set; } // 目标类型
        public float CD { get; set; } // 冷却时间
        public int SpellRange { get; set; } // 施法距离
        public float IntonateTime { get; set; } // 施法前摇
        public int Cost { get; set; } // 魔法消耗
        public string AnimName { get; set; } // 施法动作
        public int ReqLevel { get; set; } // 等级要求
        public bool IsMissile { get; set; } // 是否投射物
        public string Missile { get; set; } // 投射物
        public int MissileSpeed { get; set; } // 投射速度
        public string HitArt { get; set; } // 击中效果
        public int Area { get; set; } // 影响区域
        public string HitDelay { get; set; } // 命中延迟
        public string BUFF { get; set; } // 附加效果
        public float AD { get; set; } // 物理攻击
        public float AP { get; set; } // 法术攻击
        public float ADC { get; set; } // 物攻加成
        public float APC { get; set; } // 法攻加成
    }


}
